(write "Andlisp: lisp like script engine.\n")
(write "Copyright (C) 2010 TetsuyaYasuda@gmail.com\n")
(write "load andlisp.l ... ")

(import-class "java.lang.System")
(import-class "java.io.InputStreamReader")
(import-class "android.app.Activity")
(import-class "android.content.res.AssetManager")
(import-class "jp.tyas.libs.lisp.Builtin")

(setq *android.activity.main* *priv*)
(setq *android.assets* (android.app.Activity.getAssets *android.activity.main*))

(defun load-asset (path)
  (jp.tyas.libs.lisp.Builtin.load nil
   (new-java.io.InputStreamReader
    (android.content.res.AssetManager.open *android.assets* path))
   *toplevel*))

(let ((tmp (java.lang.system.currenttimemillis nil)))
  (load-asset "lisp/common/import.l")
  (load-asset "lisp/common/io.l")
  (load-asset "lisp/common/util.l")

  (write (- (java.lang.system.currenttimemillis nil) tmp))
  (write " ms\n"))
